<?php

namespace App\Kuafu\Banner\Enum;

use App\Kuafu\Shop\Model\CameraModel;

/**
 * @author shanchengqingye
 * @description banner 枚举类
 * @create-time 2022-02-09 19:51:55
 */
class BannerEnum
{
    //状态
    const STATUS_ON  = 0;
    const STATUS_OFF = 1;
    const STATUS_MAP = [
        self::STATUS_OFF => '暂停',
        self::STATUS_ON  => '正常'
    ];

    //类型
    const TYPE_INDEX            = 0;
    const TYPE_BANNER           = 1;
    const TYPE_AUXILIARY_SCREEN = 2;
    const TYPE_POP              = 3;

    const TYPE_ORDER_GROUP = [
        self::TYPE_INDEX  => '首页',
        self::TYPE_BANNER => 'Banner',
        self::TYPE_POP    => '弹窗',
    ];

    const TYPE_POS_GROUP = [
        self::TYPE_AUXILIARY_SCREEN => '副屏'
    ];

    const TYPE_TV_SORT_1 = 4;
    const TYPE_TV_SORT_2 = 5;
    const TYPE_TV_SORT_3 = 6;
    const TYPE_TV_SORT_4 = 7;
    const TYPE_TV_SORT_5 = 10;
    const TYPE_TV_SORT_6 = 11;

    const TYPE_TV_GROUP = [
        self::TYPE_TV_SORT_1 => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_1],
        self::TYPE_TV_SORT_2 => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_2],
        self::TYPE_TV_SORT_3 => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_3],
        self::TYPE_TV_SORT_4 => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_4],
        self::TYPE_TV_SORT_5 => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_5],
        self::TYPE_TV_SORT_6 => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_6],
    ];

    const TYPE_MAP = [
        self::TYPE_INDEX            => '首页',
        self::TYPE_BANNER           => 'banner',
        self::TYPE_AUXILIARY_SCREEN => '副屏',
        self::TYPE_POP              => '弹窗',
        self::TYPE_TV_SORT_1        => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_1],
        self::TYPE_TV_SORT_2        => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_2],
        self::TYPE_TV_SORT_3        => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_3],
        self::TYPE_TV_SORT_4        => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_4],
        self::TYPE_TV_SORT_5        => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_5],
        self::TYPE_TV_SORT_6        => CameraModel::TV_POSITION_TEXT[CameraModel::TV_POSITION_SORT_6],
        self::TYPE_TV_MATERIAL_1    => '商屏素材—组合',
        self::TYPE_TV_MATERIAL_2    => '商屏素材—单品',
    ];

    const TYPE_TV_MATERIAL_1 = 8;//商屏素材—组合
    const TYPE_TV_MATERIAL_2 = 9;//商屏素材—单品

    const TYPE_TV_MATERIAL_GROUP = [
        self::TYPE_TV_MATERIAL_1 => '商屏素材—组合',
        self::TYPE_TV_MATERIAL_2 => '商屏素材—单品'
    ];

    const BANNER_TYPE_1 = 1; //点餐小程序banner
    const BANNER_TYPE_4 = 4; //商家APP首页banner

    const BANNER_TYPE_MAPPING = [
        self::BANNER_TYPE_1 => 'Banner(点餐小程序)',
        self::BANNER_TYPE_4 => 'Banner(商家APP)'
    ];

    //生效类型
    const EFFECTIVE_TYPE_ALWAYS     = 0;
    const EFFECTIVE_TYPE_TIME_RANGE = 1;
    const EFFECTIVE_TYPE            = [
        self::EFFECTIVE_TYPE_ALWAYS     => '永久有效',
        self::EFFECTIVE_TYPE_TIME_RANGE => '区间范围',
    ];
}
